package book;

public class BookList {
    private Book[] books = new Book[10];//书架的大小

    private int usedSize;//数组中放了几本书

    public BookList(){
        books[0] = new Book("三国","罗",20,"小说");
        books[1] = new Book("红楼","曹",30,"小说");
        books[2] = new Book("西游","吴",40,"小说");
        this.usedSize = 3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public Book getPos(int pos){
        return books[pos];
    }

    public void setBooks(int pos,Book book){
        books[pos] = book;
    }
}
